public class example {

          public int f(int a,int b){
            int t;
            if(a>b){
                t=a;
                a=b;
                b=t;
            }
            while (b%a!=0){
                t=a;
                a=b%a;
                b=t;
            }
            return a;}
}
